package Business;

import java.sql.SQLException;
import java.util.List;

import ValueObject.DirectorateVO;

public interface DirectorateBO {
    /**
     * Get list of directorates.
     * @param keyword
     * @param status
     * @return list of directorates
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    List<DirectorateVO> getList(String keyword, boolean status) throws ClassNotFoundException, SQLException;

    /**
     * Get directorate bases on id.
     * @param id
     * @return directorate
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    DirectorateVO getDirect(int id) throws ClassNotFoundException, SQLException;

    /**
     * Update directorate into database.
     * @param directorate
     * @return true if update successfully, otherwise return false
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    boolean updateDirect(DirectorateVO directorate) throws ClassNotFoundException,
            SQLException;

    /**
     * Update value of IsActive column of selected directorate into database.
     * @param id
     * @param status
     * @return true if update successfully, otherwise return false
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    boolean checkActive(int id, boolean status) throws ClassNotFoundException,
            SQLException;
}
